package com.rico.deploy.service.impl;

import com.rico.deploy.entity.ClassroomType;
import com.rico.deploy.mapper.ClassroomTypeMapper;
import com.rico.deploy.service.ClassroomTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 夏智力
 * @FileName ClassroomTypeImpl
 * @date 2021/5/2 16:28
 * @Software: IntelliJ IDEA
 */
@Service
public class ClassroomTypeImpl implements ClassroomTypeService {
    @Autowired
    private ClassroomTypeMapper classroomTypeMapper;

    @Override
    public List<ClassroomType> selectAll() {
        return classroomTypeMapper.selectAll();
    }

    @Override
    public ClassroomType selectById(Integer id) {
        return classroomTypeMapper.selectByPrimaryKey(id);
    }

    @Override
    public int insertClassroomType(ClassroomType classroomType) {
        return classroomTypeMapper.insert(classroomType);
    }

    @Override
    public int deleteClassroomTypeById(Integer id) {
        return classroomTypeMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int updateClassroomType(ClassroomType classroomType) {
        return classroomTypeMapper.updateByPrimaryKey(classroomType);
    }
}
